package cn.qiao.多态;

public class Wangxiaosan extends Wangsan {
        private int age = 3;
        public Wangxiaosan(int age) {
            this.age = age;
            System.out.println("王小三的年龄：" + this.age);
        }

        public void write() { // 子类覆盖父类方法
            System.out.println("我小三上幼儿园的年龄是：" + this.age);
        }


    }